<?php use_helper('Date') ?>
<?php use_helper('Text') ?>
<?php slot('title', "搜索结果:$query - ") ?>
<!--导航-->
<div class="menu" id="topmenu">
  <ul>
    <li class="current"><?php echo link_to('首页', '@homepage'); ?></li>
    <li><?php echo link_to('艺海简介', '@html_about'); ?></li>
    <li><?php echo link_to('拍卖预告', '@article_category?catid=3'); ?></li>
    <li><?php echo link_to('艺海资讯', '@article'); ?></li>
    <li><?php echo link_to('精彩照片', '@album'); ?></li>
    <li><?php echo link_to('艺海视频', '@video'); ?></li>
    <li class="clear_bg"><?php echo link_to('业务联系', '@message'); ?></li>
  </ul>
</div>
<!--主内容-->
<div class="sale clears">
   <div class="sale_left">
 <?php if (count($newsresults)||count($topicresults)): ?>
      <?php if (count($topicresults)): ?>
	  <div class="sale_title"><h3>搜索到<?php echo count($topicresults) ?>条专题信息：</h3></div>
      <div class="sale_cont">
		  <ul>
		  <?php $i=1 ?>
		  <?php foreach (@$topicresults as $article): ?>
          <li><span><?php echo format_date($article->getCreatedAt(), 'yyyy-MM-d') ?></span><a href="<?php echo url_for('article/show?id='.$article->getId()) ?>"><?php echo $i.'.'.$article->getName(); ?></a></li>
		  <?php $i++ ?>
		  <?php endforeach ?>
         </ul>
      </div>
	  <?php endif ?>
      <?php if (count($newsresults)): ?>
      <div class="sale_title"><h3>搜索到<?php echo count($newsresults) ?>条新闻信息：</h3></div>
      <div class="sale_cont">
		  <ul>
		  <?php $i=1 ?>
		  <?php foreach (@$newsresults as $article): ?>
          <li><span><?php echo format_date($article->getCreatedAt(), 'yyyy-MM-d') ?></span><a href="<?php echo url_for('article/show?id='.$article->getId()) ?>"><?php echo $i.'.'.$article->getTitle(); ?></a></li>
		  <?php $i++ ?>
		  <?php endforeach ?>
         </ul>		 
      </div>
	  <?php endif ?>
 <?php else:?>
	<div class="sale_title"><h3>搜索结果：</h3></div>
      <div class="sale_cont">
		  <ul>
          <li>没有搜索到任何信息</li>
         </ul>		 
      </div>
 <?php endif ?>
   </div>
</div>
